<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
	DateFormat dfday = new SimpleDateFormat("yyyy-MM-dd");
	DateFormat dfmonth = new SimpleDateFormat("yyyy-MM");
	DateFormat dfyear = new SimpleDateFormat("yyyy");
	String today = dfday.format(new Date());
	
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>订单统计(后台)</title>
	<base href="<%=basePath%>/" />
	
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
	<!-- IE的渲染模式 -->
	<meta name="keywords"
		content="信帧,teleframe,iparking,I停车,爱停车,blackshadowwalker" />
	<meta name="description"
		content="信帧,teleframe,iparking,I停车,爱停车,blackshadowwalker" />
	<meta name="author" content="blackshadowwalker" />
	
	<link href="css/common.css" rel="stylesheet" />
	
    <link href="bootstrap/3/css/bootstrap.min.css" rel="stylesheet" />
    
	<link href="plugins/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
	
	<script type="text/javascript" src="scripts/jquery/jquery-1.7.min.js" ></script>	
	<script src="bootstrap/3/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="plugins/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js"  ></script>
	<script type="text/javascript" src="plugins/bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
	<script type="text/javascript" src="plugins/highcharts/highcharts.js" charset="utf-8"></script>
	<script type="text/javascript" src="plugins/highcharts/exporting.js" charset="utf-8"></script>
	
	<script src="index/js/index.js?t=234223499238" type="text/javascript"></script>
	<script src="scripts/waittool.js?t=23423001020" type="text/javascript"></script>
	<script src="scripts/formattool.js" type="text/javascript"></script>

	<script type="text/javascript">
		var msg = "${msg}";
		if(msg!="")
			alert(msg);
		
	</script>

	<style>
		body {
			margin-left: 10px;
			margin-top: 7px;
			width: 98%;
			font-size:9px;
		}
		div.highcharts-container{
			diaplay:inline;
		}
		div.map>div.submap{
			margin-right:50px;
			diaplay:inline;
		}
		
	</style>

</head>
<body>
	
	<div class="tab">
		<ul class="nav nav-tabs" name="nav-tabs" role="tablist">
			<li type="byday" ><a href="javascript:void(0);">按天查询</a></li>
			<li type="bymonth" class="active" > <a href="javascript:void(0);">按月查询</a></li>
			<li type="byyear" > <a href="javascript:void(0);">按年查询</a></li>
			<li type="byweek" > <a href="javascript:void(0);">按周查询</a></li>
		</ul>
	</div>
	
	<br/>
	
	<div class="container">
		<div class="row" type="byday" style="display:none;" title="按天查询">
			<center>
				<input type="text" id="toadytime" class="btn btn-success datetimepicker" size="16" type="text" value="<%=today %>" readonly  />	
				<input type="button" class="btn btn-info" stattype="day" for="toadytime" callback="callbackByDay" value="查询" />
				<button class="hidden-xs btn btn-primary btn-print" style="float:right" >打印</button>
			</center>
			<div class="map print">
				<div class="submap" name="map1"></div>
				<hr/>
				<div class="submap" name="map2"></div>
				<hr/>
				<div class="submap" name="map3"></div>
			</div>
		</div>
		
		<div class="row" type="bymonth" style="display:none;" title="按月查询">
			<center>
				<input type="text" id="monthtime" class="btn btn-success datetimepicker" size="16" type="text" value="<%=today.substring(0,7) %>" readonly  />
				<input type="button" class="btn btn-info" stattype="month" for="monthtime" callback="callbackByMonth"  value="查询" />
				<button class="hidden-xs btn btn-primary btn-print" style="float:right" >打印</button>
			</center>
			<div class="map print">
				<div class="submap" name="map1"></div>
				<hr/>

				<div class="submap" name="map2"></div>
				<hr/>
			
				<div class="submap" name="map3"></div>
			</div>
		</div>
		
		<div class="row" type="byyear" style="display:none;" title="按年查询" >
			<center>
				<input type="text" id="yeartime" class="btn btn-success datetimepicker" size="16" type="text" value="<%=today.substring(0,4) %>" readonly  />
				<input type="button" class="btn btn-info"  stattype="year" for="yeartime" callback="callbackByYear" value="查询" />
				<button class="hidden-xs btn btn-primary btn-print" style="float:right" >打印</button>
			</center>
			<div class="map print">
				<div class="submap" name="map1"></div>
				<hr/>
				<div class="submap" name="map2"></div>
				<hr/>
				<div class="submap" name="map3"></div>
			</div>
		</div>
		
		<div class="row" type="byweek" style="display:none;" title="按周查询" >
			<center>
				<div class="print hidden"><h2>按周查询收支统计</h2></div>
			</center>
			<center class="notprint">
				<input type="text" id="weektime" class="btn btn-success datetimepicker" size="16" type="text" value="<%=today %>" readonly  />	
				<input type="button" class="btn btn-info" stattype="week" for="weektime" callback="callbackByWeek"  value="查询" />
				<button class="hidden-xs btn btn-primary btn-print" style="float:right" >打印</button>
			</center>
			<div class="map print">
				<div class="submap" name="map1"></div>
				<hr/>
				<div class="submap" name="map2"></div>
				<hr/>
				<div class="submap" name="map3"></div>
			</div>
		</div>
		
	</div>
	<div id="botter" class="botter">
		<br/>
		<br/>
		<br/>
	</div>
	<div id="errorFiled" style="display:none;">
	
	</div>
	<script src="modules/statistics/orderstatistics/js/high.js?t=09188" type="text/javascript"></script>
	<script >

			$(document).ready(function(){
			
				var tab = $("div.tab>ul.nav-tabs>li.active");
				if(typeof(tab)!="undefined"){
					switchtab( tab.attr("type") );
				}
			//	$("div.container>div.row").show();
				
				$("#toadytime").datetimepicker({
		        	format: "yyyy-mm-dd",
		        	language : "zh-CN",
		        	weekStart: 1,
		        	startView: 2, //日期时间选择器打开之后首先显示的视图。 Number, String. 默认值：2, 'month'
		        	todayBtn: true,
		        	autoclose: true,
		        	minView: 2 //日期时间选择器所能够提供的最精确的时间选择视图,Number, String. 默认值：0, 'hour'
		   		});
		   		
		   		$("#weektime").datetimepicker({
		        	format: "yyyy-mm-dd",
		        	language : "zh-CN",
		        	weekStart: 1,
		        	startView: 2, //日期时间选择器打开之后首先显示的视图。 Number, String. 默认值：2, 'month'
		        	todayBtn: true,
		        	autoclose: true,
		        	minView: 2 //日期时间选择器所能够提供的最精确的时间选择视图,Number, String. 默认值：0, 'hour'
		   		});
		   		
		   		$("#monthtime").datetimepicker({
		        	format: "yyyy-mm",
		        	language : "zh-CN",
		        	weekStart: 1,
		        	startView: 3, //日期时间选择器打开之后首先显示的视图。 Number, String. 默认值：2, 'month'
		        	todayBtn: true,
		        	autoclose: true,
		        	minView: 3 //日期时间选择器所能够提供的最精确的时间选择视图,Number, String. 默认值：0, 'hour'
		   		});
		   		
	   			$("#yeartime").datetimepicker({
		        	format: "yyyy",
		        	language : "zh-CN",
		        	weekStart: 1,
		        	startView: 4, //日期时间选择器打开之后首先显示的视图。 Number, String. 默认值：2, 'month'
		        	todayBtn: true,
		        	autoclose: true,
		        	minView: 4 //日期时间选择器所能够提供的最精确的时间选择视图,Number, String. 默认值：0, 'hour'
		   		});
		   		
		   		//
		   		Highcharts.setOptions({
		   			lang:{
		   				contextButtonTitle: '导出',
		   				printChart: '打印',
		   				downloadJPEG: '导出为JPEG',
		   				downloadPDF: '导出为PDF',
		   				downloadPNG: '导出为PNG',
		   				downloadSVG: '导出为SVG'
		   			}
		   		});
		   		
});
	</script>
	
</body>
</html>
